package com.testfileupload.uploadimg.design.combination.optimization2;

public abstract class Corp {
    //叶子的名称
    private String name = "";
    //叶子的职位
    private String position = "";
    //叶子的薪水
    private int salory = 0;
    //父节点是谁
    private Corp parent = null;

    public Corp getParent() {
        return parent;
    }

    public void setParent(Corp parent) {
        this.parent = parent;
    }

    public Corp(String name, String position, int salory) {
        this.name = name;
        this.position = position;
        this.salory = salory;
    }
    public String getInfo() {
        String info = "";
        info = "名称：" + this.name;
        info = info + "职位" + this.position;
        info = info + "薪水" + this.salory;
        return info;
    }
}
